import request from "@/utils/request"
// 获取商品评论列表
export const getProductReviewList = (params: object) => {
    return request({
        url: "/client/review/list",
        method: 'get',
        params: params
    })
}
// 获取好评数和差评数,全部评论数
export const getProductReviewCount = (productId: number) => {
    return request({
        url: `/client/review/count/${productId}`,
        method: 'get'
    })
}
// 添加商品评论
export const addReview = (data: object) => {
    return request({
        url: "/client/review/add",
        method: 'post',
        data: data
    })
}
